#include <iostream>

class Message
{
public:
    void play()
    {
        std::cout<<"发短信\n";
    }
};

class phone 
{
public:
    void play()
    {
        std::cout<<"打电话\n";
    }
    void sendMessage()
    {
        m.play();
    }
private:
    Message m;

};

class Game
{
public:
    void play()
    {
        std::cout<<"玩游戏"<<std::endl;
    }
};

class SmartPhone : public phone,public Game //多继承：一个子类有多个父类
{


};

//多重继承：子类的父类仍有父类：间接基类
int main()
{
    SmartPhone s;
    s.sendMessage(); //二义性问题
    return 0;
}